{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% block title %}EasyOPS - Tomcat{% endblock %}
{% block page_content %}
    <table class="table table-bordered table-hover">
        <thead>
            <tr>
                <th>id</th>
                <th>Hostname</th>
                <th>OS Version</th>
                <th>IP</th>
                <th>SSHUser/port</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for host in hostlist %}
                <tr id="t{{ host.id }}">
                    <td>
                        <input type="checkbox" id="{{ host.id }}" name="tdhost" />
                    </td>
                    <td> {{ host.hostname }} </td>
                    <td>{{ host.OS }}</td>
                    <td>{{ host.IP }}</td>
                    <td>{{ host.loginUser }}/{{ host.sshport }}</td>
                    <td><a href="{{ url_for('hosts.view',category='host',id=host.id) }}" class="btn btn-default">查看</a> <a href="{{ url_for('hosts.edit_host', id=host.id) }}" class="btn btn-info">修改 </a> <a href="{{ url_for('hosts.delete',category='host',id=host.id) }}" class="btn btn-danger">删除</a></td>
                </tr>
            {% endfor %}
            <tr id="tlast">
                <td>
                    <input type="radio" name="optionsRadios" id="hostradio1"   onclick="allCheck('tdhost', true)" value="全选"/>
                    全选
                    <input type="radio" name="optionsRadios" id="hostradio2" onclick="allCheck('tdhost', false)" value="取消"/>取消
                    <input type="radio" name="optionsRadios" id="hostradio3" onclick="reserveCheck('tdhost')" value="反选"/>反选

                </td>
                <td> </td>
                <td></td>
                <td></td>
                <td></td>
                <td><a href="{{ url_for('hosts.add_host')}}" class="btn btn-default">添加</a> </td>
            </tr>
        </tbody>
    </table>
{% block appjs %}
<script type="text/javascript">
    $(document).ready(function(){
        $("div.panel-collapse.in").removeClass("in");
        $("div#collapseTwo").addClass("in");
        })
</script>
{% endblock %}
{% endblock %}
